---
layout: default
sitemap: true
id: documentation
---

<div class="page {{ page.class }}">
  <header class="page-header">
    <div class="container">
      <div class="edit-this-page">
        <a target="_blank" href="https://github.com/Kong/docs.konghq.com/tree/master/app/{{page.path}}"><i class="fa fa-github"></i>
          Edit this Page</a>
      </div>
      <nav class="docs-navigation">
        <a href="/" {% if page.edition=='community' %} class="active" {% endif %}>Kong Community</a>
        <a href="/enterprise" {% if page.edition=='enterprise' %} class="active" {% endif %}>Kong Enterprise</a>
        <a href="/studio" {% if page.edition=='studio' %} class="active" {% endif %}>Kong Studio</a>
        <a href="/getting-started-guide/latest/overview" {% if page.edition=='getting-started-guide' %} class="active" {% endif %}>Getting Started</a>
        <span class="sidebar-toggle">Open Sidebar</span>
      </nav>
      <div class="page-header-icon">
          {% if page.edition == 'community' %}
          <img src="/assets/images/icons/icn-documentation-ce.svg" alt="Documentation" />
          {% endif %}
          {% if page.edition == 'enterprise' %}
          <img src="/assets/images/icons/icn-documentation-ee.svg" alt="Documentation" />
          {% endif %}
          {% if page.edition == 'studio' %}
          <img src="/assets/images/icons/icn-documentation-studio.svg" alt="Documentation" />
          {% endif %}
      </div>
      <div class="page-header-title">
        <h1>{{page.title}}</h1>
      </div>

      <div class="dropdown page-header-right" id="searchBar">
        <div id="getkong-algolia-search" class="search-input">
          <i class="fa fa-search"></i>
          <input type="text" placeholder="Search" id="getkong-algolia-search-input" />
        </div>
      </div>
      <div class="versions-dropdown dropdown page-header-right {% if page.edition=='enterprise' %} page-header-right-enterprise {% endif %}">
        <button class="page-header-btn" id="version-dropdown" type="button" data-toggle="dropdown" aria-haspopup="true"
          aria-expanded="false">
          Version {{page.kong_version}}
          {% if page.kong_version == page.kong_latest.release %}<em>(latest)</em>{% endif %}
          <span class="caret"></span>
        </button>
        <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="version-dropdown">
          {% for ver in page.kong_versions reversed %}
          <li {% if page.kong_version==ver.release %} class="active" {% endif %}>
            <a href="/{%if page.edition == 'enterprise' %}enterprise/{% endif %}{{ver.release}}" {% if ver.release==page.kong_version
              %} class="active" {% endif %}>
              {{ver.release}}
              {% if ver.release == page.kong_latest.release %}<em>(latest)</em>{% endif %}
            </a>
          </li>
          {% endfor %}
        </ul>
      </div>
    </div>
  </header>

  <div class="container">
    <aside class="page-navigation">
      <span class="close-sidebar"></span>
      {% if page.edition == 'community' %}
      {% assign docs_url = '/' | append: page.kong_version %}
      {% endif %}
      {% if page.edition == 'enterprise' %}
      {% assign docs_url = '/' | append: 'enterprise/' | append: page.kong_version %}
      {% endif %}
      {% if page.edition == 'studio' %}
      {% assign docs_url = '/' | append: 'studio/' | append: page.kong_version %}
      {% endif %}

      {% for nav in page.nav_items %}
      <nav>
        {% if nav.url %}
        <a href="{{docs_url | append: nav.url}}">
          <h5>{{nav.title}}</h5>
        </a>
        {% else %}
        <h5>{{nav.title}}</h5>
        {% endif %}
        <ul>
          {% for item in nav.items %}
          {% capture url %}{{ docs_url | append: item.url }}/{% endcapture %}
          <li>
            <a {% if item.absolute_url %}href="{{item.url}}" {% else %}href="{{docs_url | append: item.url}}" {% endif
              %} {% if page.url==url %}class="active" {% endif %}>
              {{item.text}}
            </a>
            {% if item.items %}
            <ul>
              {% for subitem in item.items %}
              {% capture sub_url %}{{ docs_url | append: subitem.url }}/{% endcapture %}
              <li>
                <a href="{{docs_url | append: subitem.url}}" {% if page.url==sub_url %}class="active" {% endif %}>{{subitem.text}}</a>
                {% if subitem.items %}
                <ul>
                  {% for subitem in subitem.items %}
                  {% capture sub_url %}{{ docs_url | append: subitem.url }}/{% endcapture %}
                  <li>
                    <a href="{{docs_url | append: subitem.url}}" {% if page.url==sub_url %}class="active" {% endif %}>{{subitem.text}}</a>
                  </li>
                  {% endfor %}
                </ul>
                {% endif %}
              </li>
              {% endfor %}
            </ul>
            {% endif %}
          </li>
          {% endfor %}
        </ul>
      </nav>
      {% endfor %}
    </aside>

    <div class="page-content-container" id="documentation">
      <div class="page-content">
        <div class="content show-anchor-links">
          {% if page.edition == 'community' %}
          <div class="alert alert-ee">
            Maybe you were looking for the <a href="/enterprise"><strong>Enterprise Documentation</strong></a>
            instead?
          </div>
          {% endif %}
          {% if page.kong_version != page.kong_latest.release and page.has_version %}
          <div class="alert alert-warning">
            <strong>Careful!</strong> You are browsing documentation for an outdated version of Kong {% if page.edition == 'community' %}Community Gateway{% endif %}{% if page.edition == 'community' %}Enterprise{% endif %}. Go <a href="/latest">here</a>
            to browse the documentation for the latest version.
          </div>
          {% endif %}

          {% if page.edition == 'enterprise' %}
          {% unless page.skip_read_time == true or page.path contains '/admin-api/'
          or page.path contains '/pdk/' %}{% include read_time.html %}{% endunless %}
          {% endif %}

          {% assign filename = page.path | split: '/' | last %}
          {% if page.toc == true or
          page.toc != false and filename != "index.md" %}
          <h2 id="table-of-contents">Table of Contents</h2>
          {% include toc.html html=content anchor_class="scroll-to" h_max=3 %}

          {% endif %}

          {{ content }}

        </div>
      </div>
    </div>
  </div>
</div>
<style>
  @media (max-width: 768px) {
    .algolia-docsearch-suggestion--subcategory-column{
      display: none !important;
    }
  }
</style>

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>

{% if page.edition == 'community' %}
<script type="text/javascript">
  docsearch({
    apiKey: '691286ef280379144076a4f8df47a1d1',
    indexName: 'getkong',
    inputSelector: '#getkong-algolia-search-input',
    algoliaOptions: {
      hitsPerPage: 5,
      'facetFilters': ["version: {{page.kong_version}}"]
    },
    // Override selected event to allow for local environment navigation
    handleSelected: function (input, event, suggestion) {
      input.setVal('');
      window.location.href = window.location.protocol + "//" + window.location.host + suggestion.url.split(
        "docs.konghq.com")[1]
    }
    // ,debug: true // Set debug to true if you want to inspect the dropdown
  });
</script>
{% endif %}

{% if page.edition == 'enterprise' %}
<script type="text/javascript">
  docsearch({
    appId: 'T5JKD83LWT',
    apiKey: '1390283021f26e36117242934deb8d9d',
    indexName: 'prod_EE',
    inputSelector: '#getkong-algolia-search-input',
    algoliaOptions: {
      hitsPerPage: 5,
      'facetFilters': ["version: {{page.kong_version}}"]
    },
    // Override selected event to allow for local environment navigation
    handleSelected: function (input, event, suggestion) {
      input.setVal('');
      window.location.href = window.location.protocol + "//" + window.location.host + suggestion.url.split(
        "docs.konghq.com")[1]
    }
    // ,debug: true // Set debug to true if you want to inspect the dropdown
  });

</script>
{% endif %}

{% if page.edition == 'studio' %}
<script type="text/javascript">
  docsearch({
    appId: 'T5JKD83LWT',
    apiKey: '1390283021f26e36117242934deb8d9d',
    indexName: 'prod_Studio',
    inputSelector: '#getkong-algolia-search-input',
    algoliaOptions: {
      hitsPerPage: 5,
      'facetFilters': ["version: {{page.kong_version}}"]
    },
    // Override selected event to allow for local environment navigation
    handleSelected: function (input, event, suggestion) {
      input.setVal('');
      window.location.href = window.location.protocol + "//" + window.location.host + suggestion.url.split(
        "docs.konghq.com")[1]
    }
    // ,debug: true // Set debug to true if you want to inspect the dropdown
  });

</script>
{% endif %}
